/*
 * @Date: 2022-03-22 09:16:40
 * @LastEditTime: 2022-03-25 10:48:27
 */
// store.js
import { observable, action } from 'mobx-miniprogram';

// observable  -->  默认的mobx store
export const store = observable({
  // 数据字段
  openid: '',
  token: '',
  isGo2Follow: false,
  isGotCurrLocation:false,

  // actions声明
  SET_OPENID: action(function (openid) {
    this.openid = openid;
  }),
  SET_TOKEN: action(function (token) {
    this.token = token;
  }),
  SET_ISGO2FOLLOW: action(function (isGo2Follow) {
    this.isGo2Follow = isGo2Follow;
  }),
  SET_ISGOTCURRLOCATION: action(function (isGotCurrLocation) {
    this.isGotCurrLocation = isGotCurrLocation;
  }),
});